﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.Specialized;
using CodeStash.Common.DTOS;
using System.ComponentModel.Composition;
using CodeStash.Addin.Core.Interfaces;

namespace CodeStash.Addin.Core
{
    [Serializable]
    [Export(typeof(ILanguageService))]
    [PartCreationPolicy(CreationPolicy.Shared)]
    public class LanguageService : CodeStashRestBase, ILanguageService
    {
        /// <summary>
        /// Retrieve the languages from the service.
        /// </summary>
        public JSONLanguagesResult RetrieveLanguages()
        {
            return Utilities.GetValue<JSONLanguagesResult>(GetDataFromRestService("GetAllLanguages"));
        }

        
    }
}
